package com.i2863.receiptinterface.mapper;

import com.i2863.receiptinterface.entity.Winner;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WinnerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Winner record);

    Winner selectByPrimaryKey(Integer id);

    List<Winner> selectAll();

    int updateByPrimaryKey(Winner record);

    /**
     * 通过手机号和站点和活动ID查询
     * @param phoneNum
     * @param activityIdList
     * @return
     */
    List<Winner> findByPhoneNumAndSiteId(@Param("phoneNum")String phoneNum, @Param("activityIdList")List<Integer> activityIdList);

    /**
     * 通过手机号和站点和活动ID查询（带分页）
     * @param phoneNum
     * @param activityIdList
     * @param lastId
     * @return
     */
    List<Winner> findByPhoneNumAndSiteIdForPage(@Param("phoneNum")String phoneNum,@Param("activityIdList")List<Integer> activityIdList,@Param("lastId") Integer lastId);
}